home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK2.toast / Development Kits (Disc 2) / QuickDraw™ 3D / Samples / SampleCode / CustomAttribute / CustomAttribute_Lib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-15  |  1.5 KB  |  79 lines  |  [TEXT/CWIE]

  1. #include "QD3D.h"
  2. #include <string.h>
  3.  
  4. /* Here we define the new types */
  5.  
  6. #define kElementTypeName                'name'
  7. #define kElementTypeScale                'scle'
  8. #define kElementTypeUpVector            'upvt'
  9. #define kElementTypeForwardDirection    'fwrd'
  10. #define kElementTypeW3Anchor            'w3nr'
  11. #define kElementTypeW3Inline            'w3nl'
  12.  
  13. typedef enum W3AnchorOptions {
  14.     kW3AnchorOptionNone            =  0,
  15.     kW3AnchorOptionUseMap        =  1
  16. } W3AnchorOptions;
  17.  
  18. typedef struct W3AnchorData {
  19.     char                *url;
  20.     TQ3StringObject        description;
  21.     W3AnchorOptions    options;
  22. } W3AnchorData;
  23.  
  24. typedef struct W3InlineData {
  25.     char                *url;
  26. } W3InlineData;
  27.  
  28. /*
  29.  *    Call this to register all the custom attributes
  30.  *    
  31.  *    One call does it all
  32.  */
  33. void RegisterAllCustomAttributes(void);
  34.  
  35. void UnregisterAllCustomAttributes(void);
  36.  
  37. /*
  38.  *    Convenience routines for setting elements
  39.  *    
  40.  */
  41.  
  42. TQ3Status SetName(
  43.     TQ3Object    object,
  44.     char        *name);
  45.  
  46. TQ3Status SetScale(
  47.     TQ3Object    object,
  48.     double        scale);
  49.  
  50. TQ3Status SetUpVector(
  51.     TQ3Object    object,
  52.     TQ3Vector3D    *upVector);
  53.  
  54. TQ3Status SetForwardDirection(
  55.     TQ3Object    object,
  56.     TQ3Vector3D    *forwardDirection);
  57.  
  58. TQ3Status SetW3Anchor(
  59.     TQ3Object            object,
  60.     char                *url,
  61.     char                *description,
  62.     W3AnchorOptions options);
  63.  
  64. TQ3Status SetW3Inline(
  65.     TQ3Object    object,
  66.     char        *url);
  67.  
  68. /*
  69.  *    Note
  70.  *    
  71.  *    kElementNameWWWAnchor is obsolete and has been replaced by kElementW3Anchor.
  72.  */
  73. #define kElementTypeWWWAnchor    ((TQ3ElementType) Q3_OBJECT_TYPE('w','w','w','a'))
  74. #define kElementNameWWWAnchor    "WWWAnchor"
  75.  
  76. typedef struct WWWAnchorData {
  77.     char    *url;
  78. } WWWAnchorData;
  79.